package com.aviation.sell_ticket.controller;

import com.aviation.sell_ticket.service.LoginRecordService;
import com.aviation.sell_ticket.service.LoginService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("LoginRecordAction")
public class LoginRecordController {


    @Resource
    LoginRecordService loginRecordService;

    @RequestMapping("queryLoginInformation")
    public Map<String,Object> queryLoginInformation(HttpServletRequest request,String pageNumber){
        if(null==pageNumber || pageNumber.equals("")){
            pageNumber="0";
        }
        return loginRecordService.queryLoginInformation(String.valueOf(request.getAttribute("userId")),pageNumber);
    }

}
